// app.js
import http from './utils/http'
let fly = require('./utils/request')
require('./utils/leancloud-init') //初始化SDK
App({
  onLaunch() {
    //尝试提取本地存储用户信息
    try {
        var value = wx.getStorageSync('userInfo')
        if (value) {
            this.globalData.userInfo = value
          // Do something with return value
        }
      } catch (e) {
          console.log('本地数据提取失败');
        // Do something when catch error
      }
  },
  globalData: {
    userInfo: null
  },
  ...http,
  fly
})
